/*
 * <h3>Title:wheel-parent系统</h3>
 * <p>Copyright (c) 2020, wnfbx@163.com. All rights reserved.</p>
 * @author wnfbx@163.com
 */
package com.wheel.autoconfigure.dynamicdatasource.processor;

import com.wheel.autoconfigure.dynamicdatasource.loadbalancer.DataSourceLoadBalancer;

import java.util.List;

/**
 * <dt>Description:AbstractDynamicDataSourceDetermineProcessor</dt>
 * <dd>抽象决定类</dd>
 *
 * @author wnfbx@163.com
 * @version 1.0 <i>2020/1/9 16:09</i>
 * @since jdk1.7+
 */
public abstract class AbstractDynamicDataSourceDetermineProcessor implements DynamicDataSourceDetermineProcessor {

    protected List<String> masterKeys;
    protected List<String> slaveKeys;
    protected DataSourceLoadBalancer masterBalancer;
    protected DataSourceLoadBalancer slaveBalancer;
    protected boolean isJTA;

    @Override
    public void setJTA(boolean JTA) {
        isJTA = JTA;
    }

    @Override
    public void setBalancer(DataSourceLoadBalancer masterBalancer, DataSourceLoadBalancer slaveBalancer) {
        this.masterBalancer = masterBalancer;
        this.slaveBalancer = slaveBalancer;
    }

    @Override
    public void setDataSourceKeys(List<String> masterKeys, List<String> slaveKeys) {
        this.masterKeys = masterKeys;
        this.slaveKeys = slaveKeys;
    }
}
